﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Ninject;
using GalaSoft.MvvmLight;
using WebSiteAdminTool.UI.ViewModels.Security.Users;
using WebSiteAdminTool.UI.Services.ModalDialogs;
using WebSiteAdminTool.UI.Ioc.Mappings;
using Ninject.Syntax;
using Ninject.Modules;
using WebSiteAdminTool.UI.Services.Navigation;
using WebSiteAdminTool.UI.Services.MessageBoxes;
using WebSiteAdminTool.UI.Utils;
using WebSiteAdminTool.Common.Ioc;

namespace WebSiteAdminTool.UI.Ioc
{
    public class ServiceLocator : BaseLocator
    {
        #region ctors

        public ServiceLocator()
            : base(ConfigManager.ApplicationMode)
        { }

        #endregion

        #region initialization

        protected override INinjectModule GetDesignTimeBindings()
        {
            // TODO: implement
            return GetRunTimeBindings();
        }

        protected override INinjectModule GetRunTimeBindings()
        {
            return new RunTimeServiceMappings();
        }

        protected override INinjectModule GetTestTimeBindings()
        {
            // TODO: implement
            return GetRunTimeBindings();
        }

        #endregion

        #region object accessors

        public INavigationService NavigationService { get { return base.GetObject<INavigationService>(); } }
        public IModalDialogService ModalDialogService { get { return base.GetObject<IModalDialogService>(); } }
        public IMessageBoxService MessageBoxService { get { return base.GetObject<IMessageBoxService>(); } }

        #endregion
    }
}
